//---------------------------------------------------------------------------
#ifndef DPCnsChqH
#define DPCnsChqH

//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "DialPad.h"
#include "PHDS.h"
#include <ExtCtrls.hpp>
#include <Buttons.hpp>
#include "PHCheck.h"
#include "PHEdit.h"
#include "PHLabel.h"
#include "PHGridEd.h"
#include <Grids.hpp>
#include "DIALPAD.h"

//---------------------------------------------------------------------------
class TDPCnsChq1 : public TDiPad
{
  __published:  // IDE-managed Components
    TBitBtn*  BitBtn1;
    TBitBtn*  BitBtn2;
    TBitBtn*  BitBtn3;
    PHLabel*  PHLabel1;
    PHEdit*  PHEdit1;
    PHLabel*  PHLabel2;
    PHEdit*  PHEdit2;
    PHCheckBox*  PHCheckBox1;
    PHDataSource*  DSChq;
    PHGridEdit*  PHGridEdit1;
    void __fastcall BitBtn3Click( TObject* Sender );
    void __fastcall DSChqAfterOpen( TObject* Sender );
    void __fastcall BitBtn1Click( TObject* Sender );
    void __fastcall PHEdit1Change( TObject* Sender );
    void __fastcall PHEdit2Change( TObject* Sender );
    void __fastcall PHCheckBox1Click( TObject* Sender );
    void __fastcall PHGridEdit1DrawGridCell( int Row, int Col, TColor&  CorTexto, TColor&  CorFundo,
                                             bool&  AplicarCoresSelecao, PHDataSource*  PHDS,
                                             AnsiString&  Conteudo );
    void __fastcall FormShow( TObject* Sender );
    void __fastcall PHGridEdit1DblClick( TObject* Sender );
    void __fastcall FormClose( TObject* Sender, TCloseAction& Action );
    void __fastcall PHGridEdit1KeyDown( TObject* Sender, WORD& Key, TShiftState Shift );

  private: // User declarations
    void __fastcall LimpaGrid( void );

    AnsiString GE;

  public:  // User declarations
    __fastcall TDPCnsChq1( TComponent* Owner );
    void __fastcall Processamento( TObject* Sender );
    
    struct MVCHQ*  Chq;
    bool Alterar;
    char TipoAlterar;
    int CodigoAlterar;
    int ChequeAlterar;
    UINT DataInicial;
    UINT DataInicialRange;
    UINT DataFinal;
    UCHAR Vincendos;
    bool ProcessaSaldos;
};

//---------------------------------------------------------------------------
extern PACKAGE TDPCnsChq1*  DPCnsChq1;

//---------------------------------------------------------------------------
#endif

